A novel hybrid GWO–PSO-based maximum power point tracking for photovoltaic systems operating under partial shading conditions

One of the major challenges in photovoltaic (PV) systems is extracting the maximum power from the PV array, especially when they operate under partial shading conditions (PSCs). To address this challenge, this paper introduces a novel hybrid maximum power point tracking (MPPT) method based on grey wolf optimization and particle swarm optimization (GWO–PSO) techniques. The developed MPPT technique not only avoids the common disadvantages of conventional MPPT techniques (such as perturb and observe (P&O) and incremental conductance) but also provides a simple and robust MPPT scheme to effectively handle partial shading in PV systems, since it requires only two control parameters, and its convergence to the global maximum power point (GMPP) is independent of the search process's initial conditions. The feasibility and effectiveness of the hybrid GWO–PSO-based MPPT method are verified via a co-simulation technique that combines MATLAB/SIMULINK and PSIM software environments, while comparing its performance against GWO, PSO and P&O based MPPT methods. The simulation results carried out under dynamic environmental conditions have shown the satisfactory effectiveness of the hybrid MPPT method in terms of tracking accuracy, convergence speed to GMPP and efficiency, compared to other methods.

System description under PSCs. A typical PV array comprises multiple PV modules wired in series and/ or parallel to produce the appropriate current and voltage for the load. To protect shaded PV modules from hotspot damage caused by PSCs, blocking diodes and bypass diodes are used 4 . In this work, a PV array composed of two BP 380 PV modules serially connected is used, where two bypass diodes are considered to protect eighteen cells in each PV module (i.e., a 2S1P configuration) as illustrated in Fig. 1. Table 1 presents the specifications of the PV module used 30 and Table 2  www.nature.com/scientificreports/ study; the corresponding P-V curve of each SP is given in Fig. 2. For SP1, all PV sub-modules receive the same insolation, and the bypass diodes are, therefore, reverse biased and do not exhibit any effect. Hence, the current passes through each PV module and thus the PV array's P-V curve exhibits only one peak as depicted in Fig. 2. This situation is known as uniform insolation. In contrast, for patterns SP2, SP3 and SP4, the PV sub-modules do not receive the same insolation (i.e., case of PSC), the bypass diodes across the shaded PV sub-modules are, therefore, forward biased. Hence, the current from the unshaded PV sub-modules passes through the bypass diodes instead of the shaded PV sub-modules, to avoid damaging the shaded PV modules. In this case, multiple peaks appear in the PV array's P-V curve with only one GMPP, as clearly illustrated in Fig. 2. Accordingly, the PV array should operate continuously at the GMPP to extract the maximum instantaneous PV power under PSCs, thus avoiding a power loss of up to 70% 10,31 .   32 . It was modelled primarily by the simulation of the foraging behaviour of bird flocks. Based on swarm intelligence, the PSO algorithm manages a number of cooperative particles to explore the entire search space. Each particle has a unique position, x i , and velocity, v i , which could represent a candidate solution. During the search process, a particle's position is influenced by a particle's best position in a neighbourhood, P best,i , and by the best position of all particles in the whole population, G best . Accordingly, the particle position, x i , is updated using the following equation: where v i is the particle velocity which is computed by the following equation: where k is the number of iterations, c 1 and c 2 are the acceleration coefficients, r 1 and r 2 denote uniformly distributed random variables within the interval [0, 1], and w represents the inertia weight.
GWO algorithm. GWO is a novel member of SI-based metaheuristic algorithms firstly developed by Mirjalili et al. in 2014 33 . It stimulates the grey wolves' social behaviour and mimics their leadership hierarchy and hunting process in nature. In a pack, grey wolves possess an extremely strict dominant social hierarchy, consisting of four levels. The leaders, which are both female and male, are named alpha (α). The subordinate wolves, which assist the leaders, are known as beta (β) and represent the second level of the grey wolves' hierarchy. The third level of this hierarchy is called delta (δ), while the remaining wolves are termed omega (ω) and represent the lowest level of the hierarchy. In this latter, the grey wolves' dominance increases from alpha (α) to omega (ω).
(1) www.nature.com/scientificreports/ The GWO algorithm divides the candidate solutions into four groups for modelling the leadership hierarchy: alpha is the best solution, beta is the second-best solution, delta is the third best solution, and omega represents the rest of the solutions. This algorithm's solution generation process is divided into three stages: Encircling prey. This operation represents the first stage of the hunt, where the grey wolves start encircling the prey. The mathematical modelling of this stage is described as follows: where − → X and − → X P represent respectively the position vector of a search agent (wolf position) and the position vector of the optimal solution (prey position), and t is the current iteration. The coefficient vectors, denoted by − → A and − → C , are computed as follows: where components of − → a are linearly decreased from 2 to 0 during iterations, and − → r 1 , − → r 2 are random vectors in the interval [0, 1].
Hunting. This operation is directed by alpha (α) (which represents the best candidate solution), beta (β) and delta (δ), as they have greater knowledge of the likely location of the optimal solution (i.e., the prey). The remaining search agents, including the omegas, must update their positions in line with the best search agent's position. Therefore, the position of a search agent is updated using the following equations: Searching for prey and attacking prey. These two operations are ensured by the variation of adaptive values − → a and − → A , which allow the GWO algorithm to transit smoothly between exploration and exploitation. During the decrease of − → A , and when |A| ≥ 1, one-half of the iterations are intended to exploration (i.e., diverge from the prey), while the remaining half of the iterations are dedicated to exploitation when |A| < 1 (i.e., converge to the prey).
Based on alpha, beta and delta positions, the methodology used by a search agent (also called a search grey wolf) to update its position in a 2D search space is illustrated in Fig. 3. As shown, the optimal solution would be in a random place inside a circle in the search space, which is determined by alpha, beta, and delta positions. Otherwise, alpha, beta, and delta estimate the prey position (optimal solution), while the remaining wolves update their position at random around the prey 33 .
Hybrid GWO-PSO algorithm. Hybrid GWO-PSO is an SI-based optimization algorithm recently developed in 2017 by Narinder Singh et al. 29 . The basic hybridization philosophy of this algorithm is to combine the exploration capability in the GWO algorithm on the one hand, and the exploitation ability in the PSO algorithm on the other hand, to obtain the strength of both variants. For this purpose, the best three search agents' positions (α, β and δ) are updated in the search space by the new equations motioned in (10) instead of the usual equations of (7). In other words, the grey wolves' exploration and exploitation in the search space are controlled by an inertia constant (w) as modelled by the following equations: On the basis of all the above, the combination of GWO and PSO variants is performed by updating the velocity and positions equations as follows 29 : www.nature.com/scientificreports/ The hybrid GWO-PSO algorithm can be summarised by the pseudo-code depicted below in Fig. 4.

Application of hybrid GWO-PSO toward MPPT.
For MPPT realization, a DC-DC power converter is utilized to match the PV array output to the load, where the position of each search agent in the hybrid GWO-PSO algorithm is determined as decision variable, which here represents the duty cycle value ( dc ) of the power converter. Thus, the equations in (10) to (13) are modified to the following: The fitness of each search agent (i.e., the duty cycle of the power converter) is selected here as the output power ( Ppv ) of the PV array. So, to assess the duty cycles, a pulse-width-modulation (PWM) signal is generated successively by the digital controller according to the values of these duty cycles. Then, the corresponding PV power ( Ppv i ) of each duty cycle ( dc i ) can be computed from the measured PV voltage ( Vpv i ) and PV current ( Ipv i ). It is important to note that to obtain correct samples, the interval of time between two successive assessments of the duty cycle ( Ts ) must be higher than the settling time of the power converter. Furthermore, to detect if ever a change of the climatic conditions takes place, the following inequality is adopted here:

Implementation and results
Simulation setup. The 160 W PV system depicted in Fig. 7 is designed and implemented to test the performance of the proposed hybrid GWO-PSO based MPPT. It consists of two BP 380 PV modules connected in series, a boost-type DC-DC converter, an MPPT controller, and a DC load.
In this study, the effectiveness and feasibility of the proposed method are evaluated using a co-simulation technique that combines PSIM and MATLAB/SIMULINK software environments. The physical components, such as the PV modules and the DC-DC boost converter, are modelled in PSIM, while the MPPT algorithm is implemented in MATLAB/SIMULINK. In addition, a comparative performance evaluation of the proposed GWO-PSO algorithm against those of the GWO, PSO and P&O based MPPT reported in 22,26 and 34 respectively, under dynamic environmental operating conditions, is also performed. Figure 8 illustrates the MATLAB/SIM-ULINK model employed to implement the MPPT controller, while the PSIM circuit used to implement the physical parts of the system is depicted in Fig. 9, where two bypass diodes are considered to protect eighteen cells in each BP 380 PV module. The synchronization between MATLAB/SIMULINK and PSIM software environments is ensured by the SimCoupler block, as illustrated in Fig. 8. Table 3 lists the critical parameters of the developed MPPT techniques, namely hybrid GWO-PSO, GWO, PSO, and P&O.

Results and discussion. Global MPP tracking test.
To examine the capability of the hybrid GWO-PSO based metaheuristic MPPT algorithm to track the GMPP, an in-depth simulation study was carried out under both stable and transient SPs. And as it is very difficult to test all inhomogeneous insolation conditions, the four SPs plotted in Fig. 2 were considered and used in this work. As illustrated in Fig. 2, the preselected SPs include one uniform insolation pattern (SP1) and three non-uniform insolation patterns (SP2, SP3 and SP4), allowing the proposed MPPT algorithm to be tested under uniform insolation and PSCs.
First, a test under stable SPs is performed. Figure 10 depicts the output power distribution of the PV array using the hybrid GWO-PSO based MPPT method under the aforementioned four SPs. Where, for each SP, the MPPT algorithm was executed 100 times to make the results reliable and trusted. As seen in Fig. 10, the output PV power distribution is located around the corresponding GMPP value for each SP, demonstrating that the GWO-PSO based MPPT method can successfully track the GMPP under both uniform insolation and PSCs. Moreover, it can be concluded from the results obtained that the convergence ability of the proposed MPPT algorithm is independent of the initial conditions of the search process.
Since the PV array's output power varies with the environmental conditions, which are usually dynamic, the value and position of the GMPP are therefore constantly changing. Thus, the proposed MPPT algorithm must be capable of tracking the new GMPP under varying SPs. Toward this end, the following three test cases were used to perform a second test under transient SPs: begin Initial a population of N p grey wolf Xi (i = 1, 2, ..., N ); Initialize a, A, C and w; // w = 0. 5

+ rand() / 2 Calculate fitness values of each search grey wolf;
Xα= best search grey wolf (alpha); Xβ= second best search grey wolf (beta); Xδ= third best search grey wolf (delta); while (cycle < Maximum Cycle Number (MCN)); for each search grey wolf Update the velocity and position of current search grey wolf by Eqs. (12) and (13) The resulting tracking curves are given in Fig. 11a, which illustrates the dynamic responses of PV power, voltage, and current, and the corresponding duty cycle for each test. As indicated in Fig. 11a, the proposed hybrid GWO-PSO based MPPT successfully converges to the GMPP corresponding to pattern SP1 at first. And when the SP moves from a homogeneous insolation (SP1) to inhomogeneous insolations, such as SP3, SP2 and SP4 at times 15 s, 30 s and 45 s respectively, the proposed MPPT algorithm detects these changes using Eq. (18) and thus restarts the search with a total reinitialization, which allows it to successfully track again all GMPPs corresponding to the new environmental conditions.
Comparative performance assessment. This section presents a comparative performance assessment of the proposed hybrid GWO-PSO based MPPT against those of famous existing MPPT algorithms, namely: GWO, PSO and P&O. The dynamic responses of the GWO-, PSO-, and P&O-based MPPT algorithms under the same three previous test scenarios are shown in Fig. 11b-d respectively. From Fig. 11, it can be observed that the metaheuristic algorithms (i.e., GWO-PSO, GWO and PSO) successfully converge to the GMPP corresponding to the different SPs with a noticeable superiority of the GWO-PSO concerning GMPP tracking speed. While the P&O algorithm fails to differentiate between GMPP and LMPP under PSCs and consequently converges to the MPP that comes in contact first, which may be LMPP (in the case of SP3 and SP4) or GMPP (in the case of SP2). For further investigation, a comparison was made based on the three performance indices presented in Table 4, where all algorithms were executed 100 times for each SP provided in Fig. 2. As seen in Table 4, the hybrid GWO-PSO based MPPT method shows great superiority over GWO-, PSO-and P&O-based MPPT methods in terms of accuracy, GMPP tracking speed, and efficiency. Moreover, a qualitative comparison of the In this phase, the control parameters of MPPT algorithm must be set by including the number of search agents (Np), the sampling Ɵme (Ts), the maximum cycle number (MCN), (a) and (w). Then, a randomly distributed iniƟal Np duty cycles are generated.
During this phase, the generated PV power of each duty cycle (dci) is evaluated by successively outpuƫng a PWM signal to the DC-DC power converter according to the value of dci, whilst respecƟng the power converters seƩling Ɵme.
AŌer obtained the new soluƟon results, the dominant levels (alpha, beta and delta) must be updated as follows: alpha keeps the dc giving the best soluƟon, beta keeps the dc giving the second best soluƟon and delta keeps the dc giving the third best soluƟon.
In this phase, all the (Np) duty cycles are updated using equaƟons (14), (15), (16) and (17) successively, and then the newly updated duty cycles will be sent to the DC-DC converter for further fitness evaluaƟons.
During this phase, the MPPT algorithm repeats the search procedure from the duty cycles evaluaƟon phase unƟl the MCN is aƩained or the value of PV power remains unchanged (with very small variaƟon) during a specified number of successive cycles, then outputs the best duty cycle given by the search agent alpha (dcα), and consequently, the GMPP can be found.
Since the value and posiƟon of the GMPP are always changing due to the permanent variaƟons in the environmental condiƟons, the proposed MPPT algorithm should, therefore, have the ability to track the new GMPP whenever the environmental condiƟons are changed. Accordingly, the inequality in equaƟon (18) is used here to detect these changes. Thus, the search process will restart with a total reiniƟalizaƟon once equaƟon (18) is saƟsfied to ensure that the GMPP corresponding to the new environmental condiƟons is always tracked. www.nature.com/scientificreports/ proposed GWO-PSO based MPPT versus different MPPT methods existing in the literature was also carried out and reported in Table 5. It can be inferred from Table 5 that the hybrid GWO-PSO based MPPT method outperforms all other MPPT methods, and thus it can be considered as an effective solution for handling partial shading in PV systems since it requires only two control parameters to achieve very high efficiency, and its convergence to GMPP is independent of the search process's initial conditions.

Conclusion
This paper presents and discusses a new MPPT controller based on the hybrid GWO-PSO metaheuristic algorithm for harvesting the maximum available power from a PV array operating under PSCs. The proposed GWO-PSO based MPPT scheme has been given and implemented for a 160 W PV system using MATLAB/SIM-ULINK and PSIM software environments. In addition, a performance comparison assessment of the suggested MPPT method against famous existing MPPT methods, namely GWO, PSO and P&O, was also performed in this study. The simulation results carried out under different partial shading scenarios show the great superiority of the new hybrid GWO-PSO based MPPT method over other methods (GWO, PSO and P&O) concerning tracking accuracy, convergence speed to GMPP and efficiency. Furthermore, the proposed hybrid algorithm's convergence is independent of the initial conditions of the search process, and it requires only two control   www.nature.com/scientificreports/ parameters, which makes it simpler and more flexible. Plus, it does not need any prior knowledge of PV array characteristics, making it easy to implement in larger PV systems, whether off-grid or on-grid. In this work, the effectiveness of the proposed MPPT method has been verified using a co-simulation methodology, but the hardware implementation of this method is not done. Therefore, it would be interesting to implement this method in a microcontroller or a DSP (Digital Signal Processor) board. To this end, an experimental setup will be made to examine the GWO-PSO based MPPT method in a real PV system environment. Then, a thorough investigation will also be conducted to implement this hybrid MPPT method in multistring PV array systems operating under PSCs. www.nature.com/scientificreports/    www.nature.com/scientificreports/ Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/.